//
//  HHSelectUserModel.m
//  HHChatKit
//
//  Created by Henry on 2021/8/17.
//

#import "HHSelectUserModel.h"
#import "HHResources.h"

@implementation HHSelectUserModel

- (instancetype)initWithAdd {
    self = [super init];
    if (self) {
        _selectType = HHSelectUserTypeAdd;
        self.portraitImage = [HHResources getImageFromMessage:@"add"];
    }
    return self;
}

- (instancetype)initWithDelete {
    self = [super init];
    if (self) {
        _selectType = HHSelectUserTypeDelete;
        self.portraitImage = [HHResources getImageFromMessage:@"delete"];
    }
    return self;
}

+ (instancetype)modelWithAdd {
    return [[self alloc] initWithAdd];
}

+ (instancetype)modelWithDelete {
    return [[self alloc] initWithDelete];
}

+ (instancetype)modelWithUser:(HHUserModel *)user {
    HHSelectUserModel *model = [[HHSelectUserModel alloc] init];
    model.userId = user.userId;
    model.name = user.name;
    model.portrait = user.portrait;
    model.sex = user.sex;
    model.account = user.account;
    model.remark = user.remark;
    return model;
}


@end
